package com.zr.datamodel;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 订单状态实体
 * @author qiuchun
 *
 */
@Entity
@Table(name="order_status")
public class OrderStatusDM {
	//订单状态id
	private int id;
	//状态名称
	private String name;
	//备注
	private String remark;
	//状态代码
	private int code;
	private List<OrderDM> orders=new ArrayList<>();
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	@OneToMany(mappedBy="status")
	public List<OrderDM> getOrders() {
		return orders;
	}
	public void setOrders(List<OrderDM> orders) {
		this.orders = orders;
	}
	

}
